#ifndef CACHE_H_
#define CACHE_H_

void os_clean_dcache_all(void);
void os_clean_dcache_range_pa(unsigned long start, unsigned long end);
void os_clean_dcache_range(unsigned long start, unsigned long end);
void os_invalidate_dcache_all(void);
void os_invalidate_dcache_range_pa(unsigned long start, unsigned long end);
void os_invalidate_dcache_range(unsigned long start, unsigned long end);
void os_flush_dcache_all(void);
void os_flush_dcache_range_pa(unsigned long start, unsigned long end);
void os_flush_dcache_range(unsigned long start, unsigned long end);
void os_dcache_enable(void);
void os_dcache_disable(void);
int  os_dcache_status(void);

void os_invalidate_icache_all(void);
void os_invalidate_icache_range_pa(unsigned long start, unsigned long end);
void os_invalidate_icache_range(unsigned long start, unsigned long end);
void os_icache_enable(void);
void os_icache_disable(void);
int  os_icache_status(void);

void rv_cpu_init(void);

void cache_test(void);

#endif /* CACHE_H_ */